import request from '@/utils/request'

// 创建简答题
export function createSubjectShortAnswer(data) {
  return request({
    url: '/exam/subject-short-answer/create',
    method: 'post',
    data: data
  })
}

// 更新简答题
export function updateSubjectShortAnswer(data) {
  return request({
    url: '/exam/subject-short-answer/update',
    method: 'put',
    data: data
  })
}

// 删除简答题
export function deleteSubjectShortAnswer(id) {
  return request({
    url: '/exam/subject-short-answer/delete?id=' + id,
    method: 'delete'
  })
}

// 获得简答题
export function getSubjectShortAnswer(id) {
  return request({
    url: '/exam/subject-short-answer/get?id=' + id,
    method: 'get'
  })
}

// 获得简答题分页
export function getSubjectShortAnswerPage(query) {
  return request({
    url: '/exam/subject-short-answer/page',
    method: 'get',
    params: query
  })
}

// 导出简答题 Excel
export function exportSubjectShortAnswerExcel(query) {
  return request({
    url: '/exam/subject-short-answer/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
